<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="col-sm-12">
        <div class="ibox">
            <div class="ibox-body">
                <div class="fixed-table-toolbar">
                    <div class="columns pull-left">
                        <button shiro:hasPermission="system:sonsys:add" type="button" class="btn  btn-primary"
                                th:onclick="'javascript:add(\''+${project.projectId}+'\');'">
                            <i class="fa fa-plus" aria-hidden="true"></i>添加
                        </button>
                        <button shiro:hasPermission="system:sonsys:batchRemove" type="button" class="btn  btn-danger"
                                onclick="batchRemove()">
                            <i class="fa fa-trash" aria-hidden="true"></i>删除
                        </button>
                        <button shiro:hasPermission="system:productInner:downExcel" type="button"
                                class="btn  btn-success"
                                th:onclick="'javascript:downExcel(\''+${project.projectId}+'\');'">
                            <i class="glyphicon glyphicon-th-list" aria-hidden="true"></i>成本
                        </button>
                        <button shiro:hasPermission="system:productInner:downExcel2" type="button"
                                class="btn  btn-warning"
                                th:onclick="'javascript:downExcel2(\''+${project.projectId}+'\');'">
                            <i class="glyphicon glyphicon-check" aria-hidden="true"></i>报价
                        </button>
                       <button type="button" class="btn  btn-success"
                                th:onclick="'javascript:RetuenAllProject();'">
                            <i class="fa fa-share" aria-hidden="true"></i>
                        </button>


                    </div>
                    <div class="col-md-2 col-md-offset-2" style="width: 300px;">
                        <h3>
                            <strong>
                                <span th:text="${project.projectNum}"></span>
                                <input type="hidden" id="nowProjectId" th:value="${project.projectId}">
                                <span>.</span>
                                <span th:text="${project.projectName}"></span>
                                <button type="button" class="btn  btn-primary btn-xs" title="刷新当前项目的报价信息"
                                        th:onclick="'javascript:buildmoney(\''+${project.projectId}+'\');'">
                                    <i class="	glyphicon glyphicon-refresh" aria-hidden="true"></i></button>
                            </strong>
                        </h3>
                        <div class="" style="width: 400px">
                            <span>成本：</span>
                            <span id="projectchengben" th:text="${projectchengben}"
                                  style="color: red;margin-right: 5px;"></span>
                            <span>  报价：</span>
                            <span id="projectbaojia" th:text="${projectbaojia}"
                                  style="color: red;margin-right: 5px;"></span>
                            <span>  利润：</span>
                            <span id="projectlirun" th:text="${projectlirun}"
                                  style="color: red;margin-right: 5px;"></span>

                        </div>
                    </div>
                    <div class="columns pull-right">
                        <button class="btn btn-success" onclick="reLoad()">查询</button>
                    </div>
                    <div class="columns pull-right col-md-2 nopadding">
                        <input id="searchName" type="text" class="form-control"
                               placeholder="">
                    </div>
                </div>
                <table id="exampleTable" data-mobile-responsive="true">
                </table>
            </div>
        </div>
    </div>
</div>
<!--shiro控制bootstraptable行内按钮看见性 来自bootdo的创新方案 -->
<div>
    <script type="text/javascript">
        var s_edit_h = 'hidden';
        var s_remove_h = 'hidden';
        var s_resetPwd_h = 'hidden';
        var s_intosonsys_h = 'hidden';
        var s_intosonsys2_h = 'hidden';
    </script>
</div>
<div shiro:hasPermission="system:sonsys:edit">
    <script type="text/javascript">
        s_edit_h = '';
    </script>
</div>
<div shiro:hasPermission="system:sonsys:remove">
    <script type="text/javascript">
        s_remove_h = '';
    </script>
</div>
<div shiro:hasPermission="system:sonsys:downExcel">
    <script type="text/javascript">
        s_resetPwd_h = '';
    </script>
</div>
<div shiro:hasPermission="system:sonsys:downExcel2">
    <script type="text/javascript">
        s_intosonsys2_h = '';
    </script>
</div>
<div shiro:hasPermission="system:sonsys:intosonsys">
    <script type="text/javascript">
        s_intosonsys_h = '';
    </script>
</div>
</div>
<div th:include="include :: footer"></div>
<script type="text/javascript" src="/js/appjs/system/sonsys/sonsys.js"></script>

<script type="text/javascript">
    function downExcel(projectId) {
        window.location = "/system/productInner/downExcel/" + projectId;
    }

    function downExcel2(projectId) {
        window.location = "/system/productInner/downExcel2/" + projectId;
    }


</script>

<script type="text/javascript">

    function RetuenAllProject() {
        window.location = "/system/project";
    }
</script>
</body>
</html>